import App from "./App";

import { createSSRApp } from "vue";
import * as Pinia from "pinia";
import locale from "./locale";
import uviewPlus from "uview-plus";
// #ifdef H5
// import formCreateMobile from "@form-create/vant";
// import Vant from "vant";
// import "vant/lib/index.css";
// #endif

import "@/styles/index.scss";
import "virtual:windi.css";
import { uniStorage } from "./utils/storage";
import mixin from "./utils/mixin";

export function createApp() {
  const app = createSSRApp(App);
  app.use(Pinia.createPinia());
  app.use(locale);
  app.use(uviewPlus);
  // #ifdef H5
  // app.use(Vant);
  // app.use(formCreateMobile);
  // #endif

  app.use(mixin);
  uniStorage();
  return {
    app,
    Pinia,
  };
}
